<template>
  <div class="box">
    <el-form-item label="手机号" prop="pass">
      <el-input
        type="text"
        maxlength="11"
        v-model.number="loginFrom.mobile"
        autocomplete="off"
        class="input1"
      ></el-input>
      <span class="spanbox"> 点击获取验证码 </span>
    </el-form-item>
    <el-form-item label="验证码" prop="checkPass" class="input2">
      <el-input
        type="text"
        v-model="loginFrom.captcha"
        autocomplete="off"
      ></el-input>
    </el-form-item>

    <el-form-item>
      <el-button type="primary" class="shobox" @click="submitForm('ruleForm')"
        >提交</el-button
      >
    </el-form-item>
  </div>
</template>

<script>
export default {
  data() {
    return {
      loginFrom: {
        mobile: "",
        captcha: "",
      },
    };
  },
  watch: {
    loginFrom: {
      handler(fromName) {
        console.log(fromName);
      },
      deep: true,
    },
  },
};
</script>

<style lang="less" scoped>
.box {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  /deep/.el-form-item__label {
    color: white;
  }
  .el-form-item {
    margin-left: -10%;
  }
  .spanbox {
    position: relative;
    display: inline-block;
    // width: 100px;
    height: 43px;
    bottom: 1px;
    background: white;
    color: rgb(136, 136, 136);
    border-bottom-right-radius: 4px;
    border-top-right-radius: 4px;
    font-size: 14px;
    text-decoration: underline;
    cursor: pointer;
  }
  .input1 {
    width: 100px !important;
    border-right: none !important;
    /deep/.el-input__inner {
      border-bottom-right-radius: 0 !important;
      border-top-right-radius: 0 !important;
      padding: 0 5px !important;
    }
  }
  /deep/.el-input__inner {
    border: none !important;
    height: 43px !important;
  }
  .input2 {
    /deep/.el-input__inner {
      width: 200px;
    }
  }

  .box {
    display: flex;
    flex-direction: column;
    margin-top: 10px;
  }

  .shobox {
    background: linear-gradient(90deg, #1596fb, #002dff);
    width: 200px;
  }

  /deep/.qiehuanduanxin {
    text-align: center;
    margin-bottom: 20px;

    a {
      text-decoration: none !important;
      color: white !important;
      font-size: 17px;
    }
  }
}
</style>
